<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<title>코오롱</title>
<link rel="stylesheet" type="text/css" href="${requestScope.contextPath}/css/import.css" />
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-ui-1.8.14.custom.min.js"></script>
<script type="text/javascript" src="${requestScope.contextPath}/js/common.js"></script>
<c:set var="userAgent" value="${header['User-Agent']}" />
<fmt:setBundle basename="com.kolon.config.properties.config" var="config" />
<c:if test="${fn:indexOf(userAgent, 'Android') != -1}"><c:set var="platForm" value="Android" /></c:if>
<c:if test="${fn:indexOf(userAgent, 'iPhone') != -1}"><c:set var="platForm" value="iPhone" /></c:if>
<script type="text/javascript">
	function appBack() {
		var dsy_1 = document.getElementById('typeEffectDiv').style.display;
		var dsy_2 = document.getElementById('jointExecDiv').style.display;
		var dsy_3 = document.getElementById('jointExecSchDiv').style.display;
		if (dsy_1 == 'none' && dsy_2 == 'none' && dsy_3 == 'none') {
			history.back(-1);
		} else {
			$('#wrap').show();
			$('#jointExecDiv').hide();
			$('#jointExecSchDiv').hide();
			$('#typeEffectDiv').hide();
		}
	}
</script>
<link rel="stylesheet" type="text/css" href="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/css/ui-lightness/jquery-ui-1.8.14.custom.css" />
<script type="text/javascript">
	// 회사 코드
	var cpyCD = '${sessionScope.SESSION_USER_INFO.CompanyCD}';
	var toDay = '${toDay}';
	// 폼 체크
	function formCheck() {
		if ('Y' == '${edtChk}') {
			alert('PC에서 등록한 글은 PC에서만 수정이 가능 합니다.');
			return false;
		}
		if($('#Title').val() == '') {
			alert('제목을 입력해 주세요.');
			return;
		}
		if ($('#StartDate').val() == '' || $('#EndDate').val() == '') {
			alert('실시일자를 입력해 주세요.');
			return;
		}
		if ($('#StartDate').val() > toDay || $('#EndDate').val() > toDay) {
			alert('실시일자는 오늘 날짜보다 클 수 없습니다.');
			return;
		}
		if($('#htmlbody').val() == '') {
			alert('실시내용을 입력해 주세요.');
			return;
		}
		if (confirm('수정하시겠습니까?')) {
			document.execForm.submit();
		}
	}
	// 실시일자 캘린더
	$(function() {
		var dates = $('#StartDate, #EndDate').datepicker({
			showOn: "button",
			buttonImage: "${requestScope.contextPath}/images/reservation/cal1.gif",
			buttonImageOnly: true,
			//defaultDate: "+1w",
			//changeMonth: true,
			numberOfMonths: 1,
			dateFormat: 'yy-mm-dd',
			showMonthAfterYear:true,
			monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
			dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
			showButtonPanel: true,
			onSelect: function(selectedDate) {
				var option = this.id == "StartDate" ? "minDate" : "maxDate";
				var instance = $(this).data("datepicker");
				var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
				dates.not(this).datepicker("option", option, date);
			}
		});
	});
	//공동실시자 레이어 보임
	function jointExecShow() {
		$('#wrap').hide();
		$('#jointExecDiv').show();
		/**
		$.ajax({
			url: '${requestScope.contextPath}/business/mOI_/mOIJointExec.do',
			type:'POST',
			//data: {},
			dataType:'html',
			success: function(html){
				$('#jointExecDiv').html(html);
				$('#wrap').hide();
				$('#jointExecDiv').show();
			},
			error: function(){
				alert('error');
			}
		});
		**/
	}
	// 공동실시자 검색 레이어 보임 (검색)
	function jointExecSchShow(jointNm) {
		if (jointNm == '' || jointNm == undefined) {
			$.ajax({
				url: '${requestScope.contextPath}/business/mOI_/mOIJointExecSch.do',
				type:'POST',
				//data: {},
				dataType:'html',
				success: function(html){
					$('#jointExecSchDiv').html(html);
					$('#wrap').hide();
					$('#jointExecDiv').hide();
					$('#jointExecSchDiv').show();
				},
				error: function(){
					alert('error');
				}
			});
		} else {
			$.ajax({
				url: '${requestScope.contextPath}/business/mOI_/mOIJudgeExecSch.do',
				type:'POST',
				data: {
					'execNm': jointNm
				},
				dataType:'json',
				success: function(json){
					$('#jointNmList').html('');
					if(json) {
						if (json.list.length == 0) {
							$('#jointNmList').append('<li>검색된 이름이 없습니다.</li>');
						} else {
							for( i = 0 ; i < json.list.length; i++ ){
								$('#jointNmList').append('<li><a href="javascript:jointExecChoice(\''+json.list[i].UserName+'\', \''+json.list[i].UserAccount+'\');">['+json.list[i].DeptName+'] '+json.list[i].TitleName+' '+json.list[i].UserName+'</a></li>');
							}
						}
					}
				},
				error: function(){
					alert('error');
				}
			});
		}
	}
	function jointExecSch(jointName) {
		$.ajax({
			url: '${requestScope.contextPath}/business/mOI_/mOIJointExecSch.do',
			type:'POST',
			data: {
				'jointName' : jointName
			},
			dataType:'html',
			success: function(html){
				$('#jointExecSchDiv').html(html);
				$('#wrap').hide();
				$('#jointExecDiv').hide();
				$('#jointExecSchDiv').show();
			},
			error: function(){
				alert('error');
			}
		});
	}
	// 공동실시 레이어 숨김
	function closeJointExec() {
		$('#wrap').show();
		$('#jointExecDiv').hide();
		$('#jointExecSchDiv').hide();
		$('#typeEffectDiv').hide();
	}
	// 공동실시자 검색 레이어 숨김
	function closeJointExeSch() {
		$('#wrap').hide();
		$('#jointExecDiv').show();
		$('#jointExecSchDiv').hide();
		$('#typeEffectDiv').hide();
	}
	// 유형효과 레이어 숨김
	function closeTypeEffect() {
		$('#wrap').show();
		$('#jointExecDiv').hide();
		$('#jointExecSchDiv').hide();
		$('#typeEffectDiv').hide();
	}
	// 공동실시자 선택
	function jointExecChoice(jointExecNm, jointExecId) {
		if (confirm(jointExecNm + '님을 추가하시겠어요?')) {
			$('#jointExecNm').val(jointExecNm);
			$('#jointExecId').val(jointExecId);
			$('#wrap').hide();
			$('#jointExecDiv').show();
			$('#jointExecSchDiv').hide();
			$('#typeEffectDiv').hide();
		}
	}
	// 공동실시자 추가
	function jointExecAdd() {
		check = true;
		$('#jointExecTb #jointId').each(function() {
			if ($(this).val() == $('#jointExecId').val()) {
				check = false;
			}
		});
		if (check) {
			i = $('#jointExecTb tr').size();
			if ($('#jointExecNm').val() == '' || $('#importance').val() == '') {
				alert('이름 및 비중을 입력하세요.');
				return;
			}
			$('#jointExecTb').append('<tr><td colspan="2">'+$('#jointExecNm').val()+'<input type="text" size="5" id="jointNm" value="'+$('#jointExecNm').val()+'" /><input type="text" size="5" id="jointId" value="'+$('#jointExecId').val()+'" /></td><td><input type="text" id="per" name="importance2 "class="intxt3" onkeyup="plusAll();" value="'+$('#importance').val()+'" /></td><td class="tc"><img src="${requestScope.contextPath}/images/btn/btn_del3.gif" alt="삭제" onclick="$(this).parent().parent().remove();" /></td></tr>');
			plusAll();
		} else {
			alert('이미 추가되었습니다.');
			return;
		}
	}
	// 공동실시자 가중치 합계
	function plusAll() {
		cnt = 0;
		$('#jointExecTb #per').each(function() {
			cnt = cnt + parseInt($(this).val());
		});
		$('#plusAll').val(cnt);
	}
	// 공동실시자 등록
	function jointExecInsert() {
		if ($('#plusAll').val() != '100') {
			alert('가중치합계가 100이 되지 않습니다. 100을 맞춰주세요.');
			return;
		}
		if (confirm('등록하시겠습니까?')) {
		src = '';
		src_ = '';
		i = 0;
		$('#jointExecTb #per').each(function() {
			if ($('#jointExecTb #per').size() == i+1)
				src += $('#jointExecTb #jointNm:eq('+i+')').val() +'('+$(this).val()+')';
			else
				src += $('#jointExecTb #jointNm:eq('+i+')').val() +'('+$(this).val()+'),';
			src_ +=  $('#jointExecTb #jointId:eq('+i+')').val() + ','+$('#jointExecTb #jointNm:eq('+i+')').val()+','+$(this).val()+';';
			i++;
		});
		$('#joint').val(src);
		$('#joint_').val(src_);
		closeJointExec();
		}
	}
	// 유형효과 레이어 보임
	function typeEffectShow() {
		$('#wrap').hide();
		$('#jointExecDiv').hide();
		$('#jointExecSchDiv').hide();
		$('#typeEffectDiv').show();
		/**
		$.ajax({
			url: '${requestScope.contextPath}/business/mOI_/mOITypeEffect.do',
			type:'POST',
			dataType:'html',
			success: function(html){
				$('#typeEffectDiv').html(html);
				$('#wrap').hide();
				$('#jointExecDiv').hide();
				$('#jointExecSchDiv').hide();
				$('#typeEffectDiv').show();
			},
			error: function(){
				alert('error');
			}
		});
		**/
	}
	// 유형효과 등록
	function tpyeEffectWrite() {
		html = '';
		uCD = $('#typeEffect_ option:selected').val();
		if (uCD == '') {
			alert('유형효과를 선택 하세요.');
			return;
		}
		if (isNaN($('#money1_').val()) && $('#money1_').val() != undefined) {
			alert('숫자만 입력해 주세요.');
			$('#money1_').val('');
			return;
		}
		if (isNaN($('#money2_').val()) && $('#money2_').val() != undefined) {
			alert('숫자만 입력해 주세요.');
			$('#money2_').val('');
			return;
		}
		if (isNaN($('#money3_').val()) && $('#money3_').val() != undefined) {
			alert('숫자만 입력해 주세요.');
			$('#money3_').val('');
			return;
		}
		if (isNaN($('#money4_').val()) && $('#money4_').val() != undefined) {
			alert('숫자만 입력해 주세요.');
			$('#money4_').val('');
			return;
		}
		if (isNaN($('#money5_').val()) && $('#money5_').val() != undefined) {
			alert('숫자만 입력해 주세요.');
			$('#money5_').val('');
			return;
		}
		if (isNaN($('#money6_').val()) && $('#money6_').val() != undefined) {
			alert('숫자만 입력해 주세요.');
			$('#money6_').val('');
			return;
		}
		if (confirm('등록하시겠습니까?')) {
			money1_ = $('#money1_').val() == '' ? '0' : $('#money1_').val();
			money2_ = $('#money2_').val() == '' ? '0' : $('#money2_').val();
			money3_ = $('#money3_').val() == '' ? '0' : $('#money3_').val();
			money4_ = $('#money4_').val() == '' ? '0' : $('#money4_').val();
			money5_ = $('#money5_').val() == '' ? '0' : $('#money5_').val();
			money6_ = $('#money6_').val() == '' ? '0' : $('#money6_').val();
			$('#typeEffect').val(uCD);
			$('#workBase').val($('#workBase_').val());
			if (cpyCD == 'KEC' && uCD == 'A00053') {
				if (money3_ == '0' ||  money4_ == '0' || money5_ == '0' || money6_ == '0') {
					alert('매출과 매출이익을 입력해 주세요.');
					return;
				}
				$('#money1').val(money3_);
				$('#money2').val(money4_);
				$('#money3').val(money5_);
				$('#money4').val(money6_);
			} else {
				if (money1_ == '0' ||  money2_ == '0') {
					alert('효과 금액을 입력해 주세요.');
					return;
				}
				$('#money1').val(money1_);
				$('#money2').val(money2_);
			}
			html +='<table>';
			html +='<tr>';
			html +='<td width="50%">유형 : </td>';
			html +='<td width="50%" align="right">'+$('#typeEffect_ option:selected').text()+' (단위:원)</td>';
			html +='</tr>';
			// 건설이고 매출증대 인 경우
			if (cpyCD == 'KEC' && uCD == 'A00053') {
				html +='<tr>';
				html +='<td>매출 전체 : </td>';
				html +='<td align="right">'+money3_+'원</td>';
				html +='</tr>';
				html +='<tr>';
				html +='<td>매출 금년 : </td>';
				html +='<td align="right">'+money4_+'원</td>';
				html +='</tr>';
				html +='<tr>';
				html +='<td>매출이익 전체 : </td>';
				html +='<td align="right">'+money5_+'원</td>';
				html +='</tr>';
				html +='<tr>';
				html +='<td>매출이익 금년 : </td>';
				html +='<td align="right">'+money6_+'원</td>';
				html +='</tr>';
			// 그외 인 경우
			} else {
				if (cpyCD == 'KEC') {
					html +='<tr>';
					html +='<td>전체 : </td>';
					html +='<td align="right">'+money1_+'원</td>';
					html +='</tr>';
					html +='<tr>';
					html +='<td>금년 : </td>';
					html +='<td align="right">'+money2_+'원</td>';
					html +='</tr>';
				} else {
					html +='<tr>';
					html +='<td>년간 : </td>';
					html +='<td align="right">'+money1_+'원</td>';
					html +='</tr>';
					html +='<tr>';
					html +='<td>금년 : </td>';
					html +='<td align="right">'+money2_+'원</td>';
					html +='</tr>';
				}
			}
			html +='</table>';
			$('#typeEffectResultDiv').html(html);
			closeTypeEffect();
		}
	}
	// 유형효과 유형 이벤트
	function typeEffectOnchange(val) {
		// 건설 인 경우
		if (cpyCD == 'KEC') {
			if (val != '') {
				// 매출증대 인 경우
				if (val == 'A00053') {
					$('#yearTbody').hide();
					$('#salesTbody').show();
				// 그외 원가절검, 기타 인 경우
				} else {
					$('#yearTbody').show();
					$('#salesTbody').hide();
				}
			} else {
				$('#yearTbody').hide();
				$('#salesTbody').hide();
			}
		} else {
			if (val != '') {
				$('#yearTbody').show();
			} else {
				$('#yearTbody').hide();
			}
		}
	}
	function numCheck(num, obj) {
		if (isNaN(num)) {
			alert('숫자만 입력해 주세요.');
			obj.value = '';
		}
	}
</script>
</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>O.I. 제안</h1>
		</div><!-- // header -->
		<div class="content">
			<h3>실시제안 수정</h3>
			<div class="table5">
			<form name="execForm" action="${requestScope.contextPath}/business/mOI_/mOIExecSuggestionModify.do" method="post" onsubmit="return false;">
			<input type="hidden" name="seq" value="${param.seq}" />
			<input type="hidden" name="sugflag" value="${param.sugflag}" />
			<input type="hidden" name="page" value="${param.page}" />
			<input type="hidden" name="endY" value="${param.endY}" />
				<table summary="" cellspacing="0" style="width:100%;">
					<caption>실시제안 수정</caption>
					<colgroup>
						<col style="width:25%" />
						<col style="width:75%" />
						</colgroup>
					<tbody>
						<tr>
							<th scope="row"><label for="name">제안자</label></th>
							<td><input type="text" name="name" id="name" class="intxt3" value="${sessionScope.SESSION_USER_INFO.UserName} ${sessionScope.SESSION_USER_INFO.DeptName}" readonly="readonly" /></td>
						</tr>
						<tr>
							<th scope="row">심사부서</th>
							<td><input type="text" name="JudgeDeptCode" class="intxt5" id="JudgeDeptCode" value="${sessionScope.SESSION_USER_INFO.DeptName}" readonly="readonly" /></td>
						</tr>
						<tr>
							<th scope="row"><label for="title">제목</label></th>
							<td><input type="text" name="Title" class="intxt3" id="Title" value="${map.Title}" /></td>
						</tr>
						<tr>
							<th scope="row">실시일자</th>
							<td><p><input type="text" id="StartDate" name="StartDate" size="15" readonly="readonly" value="20${map.ExecSDate}" /> <br/> &nbsp;&nbsp;&nbsp;&nbsp;~&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" id="EndDate" name="EndDate" size="15" readonly="readonly" value="20${map.ExecEDate}" /></p></td>
						</tr>
						<tr>
							<th scope="row">공동실시자 <br/><br/><a href="javascript:jointExecShow();"><img src="${requestScope.contextPath}/images/btn/register.gif" alt="등록" /></a></th>
							<td><input type="hidden" id="joint_" name="JoinerWeight" class="intxt3" readonly="readonly" value="${map.strJoiner}" /> <input type="text" id="joint" name="name2" class="intxt3" readonly="readonly" value="${map.perStr}" /></td>
						</tr>
						<c:choose>
						<c:when test="${sessionScope.SESSION_USER_INFO.CompanyCD eq 'KIC'}">
						<tr>
							<th scope="row">유형</th>
							<td><input type="radio" name="SugFlag" <c:if test="${map.SugFlag eq 'A00001'}">checked="checked"</c:if> id="oi" value="A00001" /><label for="oi">O.I. 제안</label>&nbsp;&nbsp;<input type="radio" name="SugFlag" id="operate" value="A00002" <c:if test="${map.SugFlag eq 'A00002'}">checked="checked"</c:if> /><label for="operate">COST제안</label></td>
						</tr>
						</c:when>
						<c:when test="${sessionScope.SESSION_USER_INFO.CompanyCD eq 'KGT'}">
						<tr>
							<th scope="row">유형</th>
							<td><input type="radio" name="SugFlag" <c:if test="${map.SugFlag eq 'A00001'}">checked="checked"</c:if> id="oi" value="A00001" /><label for="oi">O.I. 제안</label>&nbsp;&nbsp;<input type="radio" name="SugFlag" id="operate" value="A00002" <c:if test="${map.SugFlag eq 'A00002'}">checked="checked"</c:if> /><label for="operate">환경경영</label></td>
						</tr>
						</c:when>
						</c:choose>
						<tr>
							<th scope="row"><label for="htmlbody">실시내용</label></th>
							<td><textarea cols="30" rows="3" id="htmlbody" name="htmlbody" class="comment">${map.Content}</textarea></td>
						</tr>
						<tr>
							<th scope="row">유형효과 <br/><br/><a href="javascript:typeEffectShow();"><img src="${requestScope.contextPath}/images/btn/btn_insert2.gif" alt="입력" /></a></th>
							<td>
								<input type="hidden" id="typeEffect" name="Status" class="intxt5" size="5" value="${map.Status}" />
								<input type="hidden" id="workBase" name="Reson" class="intxt5" size="5" value="${map.Reson}" />
								<input type="hidden" id="money1" name="YearEff" class="intxt5" size="5" value="${map.YearEffect}" />
								<input type="hidden" id="money2" name="ThisYearEff" class="intxt5" size="5" value="${map.ThisYearEffect}" />
								<input type="hidden" id="money3" name="YearEff2" class="intxt5" size="5" value="${map.YearEffect2}" />
								<input type="hidden" id="money4" name="ThisYearEff2" class="intxt5" size="5" value="${map.ThisYearEffect2}" /> 
								<div id="typeEffectResultDiv">
								<c:if test="${map.StatusName ne ''}">
								<table width="100%">
									<tr>
										<td>유형효과 : </td>
										<td>${map.StatusName}</td>
									</tr>
									<c:choose>
									<c:when test="${map.CompanyCD eq 'KEC' and map.Status eq 'A00053'}">
									<tr>
										<td>년간효과(매출) : </td>
										<td>${map.YearEffect}원</td>
									</tr>
									<tr>
										<td>금년효과(매출) : </td>
										<td>${map.ThisYearEffect}원</td>
									</tr>
									<tr>
										<td>년간효과(매출이익) : </td>
										<td>${map.YearEffect2}원</td>
									</tr>
									<tr>
										<td>금년효과(매출이익) : </td>
										<td>${map.YearEffect2}원</td>
									</tr>
									<tr>
										<td>산출근거 : </td>
										<td>${map.Reson}</td>
									</tr>
									</c:when>
									<c:otherwise>
									<tr>
										<td><c:choose><c:when test="${map.CompanyCD eq 'KEC'}">전체</c:when><c:otherwise>년간</c:otherwise></c:choose>효과 : </td>
										<td>${map.YearEffect}원</td>
									</tr>
									<tr>
										<td>금년효과 : </td>
										<td>${map.ThisYearEffect}원</td>
									</tr>
									<tr>
										<td>산출근거 : </td>
										<td>${map.Reson}</td>
									</tr>
									</c:otherwise>
									</c:choose>
								</table>
								<!-- <p><a href="#"><img src="${requestScope.contextPath}/images/btn/btn_modify.gif" alt="수정" /></a></p> -->
								</c:if>
								</div>
							</td>
						</tr>
					</tbody>
				</table>
				</form>
			</div>
			<div class="btn_area2" style="padding-bottom:20px;">
				<p><a href="javascript:formCheck();"><img src="${requestScope.contextPath}/images/btn/btn_modify.gif" alt="수정" /></a>&nbsp;&nbsp;<a href="${requestScope.contextPath}/business/mOI_/mOI.do"><img src="${requestScope.contextPath}/images/btn/btn_reset.gif" alt="취소" /></a></p>
			</div>
		</div><!-- // content -->
	</div><!-- // wrap -->
	<div id="jointExecDiv" style="display: none;">
		<div class="header">
			<h1>O.I. 제안</h1>
			<p class="list"><a href="#" onclick="closeJointExec();"><img src="${requestScope.contextPath}/images/btn/btn_close2.gif" alt="닫기" /></a></p>
		</div><!-- // header -->
		<div class="content">
			<h3>공동실시자</h3>
			<div class="table5">
				<table id="jointExecTb" summary="" cellspacing="0" style="width:100%;">
					<caption>공동실시자</caption>
					<colgroup>
						<col style="width:35%" />
						<col style="width:25%" />
						<col style="width:15%" />
						<col style="width:25%" />
						</colgroup>
					<tbody>
						<tr>
							<td colspan="2"><input type="text" id="jointExecNm" name="jointExecNm" class="intxt5" onclick="jointExecSchShow();" readonly="readonly" size="5" /><input type="hidden" id="jointExecId" name="jointExecId" class="intxt5" readonly="readonly" size="5" /></td>
							<td><input type="text" id="importance" name="importance" class="intxt3" onkeyup="numCheck(this.value, this);" /></td>
							<td class="tc"><a href="javascript:jointExecAdd();"><img src="${requestScope.contextPath}/images/btn/btn_plus2.gif" alt="추가"/></a></td>
						</tr>
						<tr>
							<td colspan="2">${sessionScope.SESSION_USER_INFO.UserName}<input type="hidden" size="5" id="jointNm" value="${sessionScope.SESSION_USER_INFO.UserName}" /><input type="hidden" size="5" id="jointId" value="${sessionScope.SESSION_USER_INFO.userId}" /></td>
							<td><input type="text" id="per" name="per" class="intxt3" value="${perList[0].perNum}" onkeyup="plusAll();numCheck(this.value, this);" /></td>
							<td class="tc">등록자</td>
						</tr>
						<c:forEach items="${perList}" var="perMap" begin="1">
						<tr><td colspan="2">${perMap.perNm}<input type="hidden" size="5" id="jointNm" value="${perMap.perNm}" /><input type="hidden" size="5" id="jointId" value="${perMap.perId}" /></td><td><input type="text" id="per" name="importance2 "class="intxt3" onkeyup="plusAll();" value="${perMap.perNum}" /></td><td class="tc"><img src="${requestScope.contextPath}/images/btn/btn_del3.gif" alt="삭제" onclick="$(this).parent().parent().remove();" /></td></tr>
						</c:forEach>
					</tbody>
				</table>
				<table summary="" cellspacing="0" style="width:100%;">
						<tr>
							<th scope="row">합 계</th>
							<td></td>
							<td><input type="text" id="plusAll" name="importance2" class="intxt3" readonly="readonly" value="100" size="5" /></td>
							<td></td>
						</tr>
				</table>
			</div>
			<div class="btn_area2" style="padding-bottom:20px;">
				<p>
					<a href="javascript:jointExecInsert();"><img src="${requestScope.contextPath}/images/btn/register.gif" alt="등록" /></a>&nbsp;&nbsp;
					<a href="#" onclick="closeJointExec();"><img src="${requestScope.contextPath}/images/btn/btn_reset.gif" alt="취소" /></a>
				</p>
			</div>
		</div>
	</div>
	<div id="jointExecSchDiv"></div>
	<div id="typeEffectDiv" style="display: none;">
		<div class="header">
			<h1>O.I. 제안</h1>
			<p class="list"><a href="javascript:closeTypeEffect();"><img src="${requestScope.contextPath}/images/btn/btn_close2.gif" alt="닫기" /></a></p>
		</div><!-- // header -->
		<div class="content">
			<h3>유형효과</h3>
			<div class="access">
			<div class="table5">
				<table summary="" cellspacing="0" style="width:100%">
					<caption>concise 검색</caption>
					<colgroup>
						<col style="width:20%" />
						<col style="width:80%" />
					</colgroup>
					<tbody>
						<tr>
							<th scope="row">유형효과</th>
							<td>
								<select style="width:50%" id="typeEffect_" onchange="typeEffectOnchange(this.value);">
									<option value="">유형효과 선택</option>
									<c:forEach var="gbMap" items="${gbList}" varStatus="state">
									<option value="${gbMap.UCODE}" <c:if test="${gbMap.UCODE eq map.Status}">selected="selected"</c:if>>${gbMap.SUB1}</option>
									</c:forEach>
								</select>
							</td>
						</tr>
						<tr>
							<th scope="row">산출근거</th>
							<td><textarea cols="" rows="3" id="workBase_" class="comment" >${map.Reson}</textarea></td>
						</tr>
					</tbody>
					<c:choose>
					<c:when test="${sessionScope.SESSION_USER_INFO.CompanyCD eq 'KEC'}">
					<tbody id="yearTbody" <c:if test="${map.Status eq 'A00053'}">style="display: none;"</c:if>>
						<tr>
							<th scope="row">년간환산</th>
							<td>
								<p><span class="subtitle">전체효과</span></p>
								<p><input type="text" id="money1_" class="intxt3" value="${map.YearEffect}" onkeyup="numCheck(this.value, this);" /> 원</p>
								<p><span class="subtitle">금년효과</span></p>
								<p><input type="text" id="money2_" value="${map.ThisYearEffect}" onkeyup="numCheck(this.value, this);" class="intxt3" /> 원</p>
							</td>
						</tr>
					</tbody>
					<tbody id="salesTbody" <c:if test="${map.Status ne 'A00053'}">style="display: none;"</c:if>>
						<tr>
							<th scope="row">매 출</th>
							<td>
								<p><span class="subtitle">전체효과</span></p>
								<p><input type="text" id="money3_" class="intxt3" value="${map.YearEffect}" onkeyup="numCheck(this.value, this);" /> 원</p>
								<p><span class="subtitle">금년효과</span></p>
								<p><input type="text" id="money4_" class="intxt3" value="${map.ThisYearEffect}" onkeyup="numCheck(this.value, this);" /> 원</p>
							</td>
						</tr>
						<tr>
							<th scope="row">매출이익</th>
							<td>
								<p><span class="subtitle">전체효과</span></p>
								<p><input type="text" id="money5_" class="intxt3" value="${map.YearEffect2}" onkeyup="numCheck(this.value, this);" /> 원</p>
								<p><span class="subtitle">금년효과</span></p>
								<p><input type="text" id="money6_" class="intxt3" value="${map.ThisYearEffect2}" onkeyup="numCheck(this.value, this);" /> 원</p>
							</td>
						</tr>
					</tbody>
					</c:when>
					<c:otherwise>
					<tbody id="yearTbody" <c:if test="${map.Status eq ''}">style="display: none;"</c:if>>
						<tr>
							<th scope="row">년간환산</th>
							<td>
								<p><span class="subtitle">년간효과</span>향후 1년간을 예상한 효과금액 산출</p>
								<p><input type="text" id="money1_" class="intxt3" value="${map.YearEffect}" onkeyup="numCheck(this.value, this);" /> 원</p>
								<p><span class="subtitle">금년효과</span>현재부터 금년까지의 효과금액 산출</p>
								<p><input type="text" id="money2_" value="${map.ThisYearEffect}" onkeyup="numCheck(this.value, this);" class="intxt3" /> 원</p>
							</td>
						</tr>
					</tbody>
					</c:otherwise>
					</c:choose>
				</table>
			</div>
			<div>
			<p class="btn_more" style="padding-bottom:20px;">
				<a href="javascript:tpyeEffectWrite();"><img src="${requestScope.contextPath}/images/btn/register.gif" alt="등록" /></a>&nbsp;&nbsp;
				<a href="javascript:closeTypeEffect();"><img src="${requestScope.contextPath}/images/btn/btn_reset.gif" alt="취소" /></a>
			</p>
			</div>
			</div>
		</div>
	</div>
</body>
</html>